import { plugin, puppeteer} from '../../api/api.js';
import Help from '../../model/help.js';




export class paotu extends plugin {
    constructor() {
      super({
        name: 'Userrun',
        dsc: '跑图模块',
        event: 'message',
        rule: [
          {
            reg: '^世界地图$',
            fnc: 'map',
          }
          
        ],
      });
    }

    async map(e) {
        let data = await Help.getmap(e);
        let img = await this.cache(data);
        await e.reply(img);
    }
    async cache(data) {
        
        
       let img = await puppeteer.screenshot('map', data);
        
        return img;
      }







}